package com.qiaoas.springbootjdbctemplate.Service.Impl;

import com.qiaoas.springbootjdbctemplate.Bean.User;
import com.qiaoas.springbootjdbctemplate.Dao.UserDao;
import com.qiaoas.springbootjdbctemplate.Service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("userService")
public class UserServiceImp implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public int insert(User user) {
        return this.userDao.insert(user);
    }

    @Override
    public int update(User user) {
        return this.userDao.update(user);
    }

    @Override
    public int delete(User user) {
        return this.userDao.delete(user);
    }

    @Override
    public User selete(int no) {
        return this.userDao.selete(no);
    }

    @Override
    public List<Map<String, Object>> userList() {
        return this.userDao.userList();
    }
}
